package org.onionframework.persistence.dao.processor;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.onionframework.persistence.dao.CriteriaBuilder;
import org.onionframework.persistence.dao.PropertyFilterProcessor;

public class SizeLtProcessor implements PropertyFilterProcessor {

	@Override
	public Criterion buildCriterion(String alias, String name, Object value,
			CriteriaBuilder context) {
		return Restrictions.sizeLt(alias, (Integer)value);
	}

}
